package com.sdu.cloudservice.dao;

import com.sdu.cloudservice.entity.TestUserEntity;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

/**
 * Create by zekdot on 19-6-19.
 */
@Mapper
@Repository
public interface TestUserDao {

    @Select("SELECT * FROM test_user WHERE id=#{id}")
    TestUserEntity findUserById(@Param("id") int id);

    @Insert("INSERT INTO test_user(name) VALUES(#{name})")
    int insertUser(@Param("name") String name);

    int deleteUser(@Param("id") int id);

}
